#include "operator.h"
#include <algorithm>
#include "vkinfer/core/logger.h"
#include <iostream>

namespace vkinfer
{
	OpType op_string2type(const std::string& op_type_name)
	{
		if (op_type_name == "Gemm")
			return OpType::OP_TYPE_LINEAR;
		else if (op_type_name == "Add")
			return OpType::OP_TYPE_ADD;
		else if (op_type_name == "Relu")
			return OpType::OP_TYPE_RELU;
		else if (op_type_name == "Conv")
			return OpType::OP_TYPE_CONV2D;
		else if (op_type_name == "MaxPool")
			return OpType::OP_TYPE_MAXPOOL;
		else if (op_type_name == "AveragePool")
			return OpType::OP_TYPE_AVERAGEPOOL;
		else if (op_type_name == "Flatten")
			return OpType::OP_TYPE_FLATTEN;
		else if (op_type_name == "GlobalAveragePool")
			return OpType::OP_TYPE_GLOBALAVERAGEPOOL;
		else if (op_type_name == "Concat")
			return OpType::OP_TYPE_CONCAT;

		return OpType::OP_TYPE_INVALID;
	}
}
